package com.ruoyi.project.system.base_family_info.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.base_family_info.mapper.BaseFamilyInfoMapper;
import com.ruoyi.project.system.base_family_info.domain.BaseFamilyInfo;
import com.ruoyi.project.system.base_family_info.service.IBaseFamilyInfoService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 户信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-02-17
 */
@Service
public class BaseFamilyInfoServiceImpl implements IBaseFamilyInfoService 
{
    @Autowired
    private BaseFamilyInfoMapper baseFamilyInfoMapper;

    /**
     * 查询户信息
     * 
     * @param fid 户信息ID
     * @return 户信息
     */
    @Override
    public BaseFamilyInfo selectBaseFamilyInfoById(String fid)
    {
        return baseFamilyInfoMapper.selectBaseFamilyInfoByFid(fid);
    }

    /**
     * 查询户信息列表
     * 
     * @param baseFamilyInfo 户信息
     * @return 户信息
     */
    @Override
    public List<BaseFamilyInfo> selectBaseFamilyInfoList(BaseFamilyInfo baseFamilyInfo)
    {
        return baseFamilyInfoMapper.selectBaseFamilyInfoList(baseFamilyInfo);
    }

    /**
     * 新增户信息
     * 
     * @param baseFamilyInfo 户信息
     * @return 结果
     */
    @Override
    public int insertBaseFamilyInfo(BaseFamilyInfo baseFamilyInfo)
    {
        return baseFamilyInfoMapper.insertBaseFamilyInfo(baseFamilyInfo);
    }

    /**
     * 修改户信息
     * 
     * @param baseFamilyInfo 户信息
     * @return 结果
     */
    @Override
    public int updateBaseFamilyInfo(BaseFamilyInfo baseFamilyInfo)
    {
        return baseFamilyInfoMapper.updateBaseFamilyInfo(baseFamilyInfo);
    }

    /**
     * 删除户信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteBaseFamilyInfoByIds(String ids)
    {
        return baseFamilyInfoMapper.deleteBaseFamilyInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除户信息信息
     * 
     * @param fid 户信息ID
     * @return 结果
     */
    @Override
    public int deleteBaseFamilyInfoById(String fid)
    {
        return baseFamilyInfoMapper.deleteBaseFamilyInfoById(fid);
    }


}
